9/8/2020

Abstract

Drivers that circulate inside cities in Portugal have a maximum speed limit of 50 km/h, but the behaviour is not always in compliance with the law. After observing the possibility of high speeds in the road Avenida Almirante Gago Coutinho in Mem-Martins, Sintra, Portugal, the vehicle speed was measured with a Raspberry Pi Zero W and an exploratory data analysis was performed in R. It was verified that the vehicles moving from Mem-Martins to Sintra had a mean speed of 69 km/h and from Sintra to Mem-Martins had a mean speed of 87 km/h This road have a pedestrian crossing about 40 meters after the experimental measuring local, and two schools and a sports hall nearby that encourage the presence of many pedestrians in the sidewalk of this road.

Donations

If you like this project and wish to help me continue developing this kind of projects share, or make a small donation! ;)

Data acquisition

Data was acquired in August 2020.
Details of the hardware setup can seen in the repository of this project in VascoRibeiroPereira/carspeed.py.

Raspberry pi Zero W with webcam

Measurement local


Road Avenida Almirante Gago Coutinho in Mem-Martins, Sintra, Portugal.

Exploratory Data analysis

Detailed information in Project website.

The cleaned data have this appearance:

knitr::kable(head(df,3))
Date_Measured Direction Speed
2020-08-03 10:00:00 Sintra-MemMartins 88.11111
2020-08-03 10:00:00 MemMartins-Sintra 69.95789
2020-08-03 11:00:00 Sintra-MemMartins 88.10989

Data Plot

Data Summary

summary(filter(df, Direction == 'MemMartins-Sintra')$Speed)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  39.60   66.22   68.00   68.65   70.00  117.00 
summary(filter(df, Direction == 'Sintra-MemMartins')$Speed)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  52.00   83.99   87.24   87.45   90.49  115.00 

Conclusion

The possibility of high speeds in the road Avenida Almirante Gago Coutinho was confirmed with maximum speeds of 117 km/h which is a crime in this location.
The mean speed in both directions are above the permitted velocity - 69 km/h and 87 km/h.
It is highly recommended the imposition of preventive measures such as speed bumps.